<template>
  <div class="app-container">
    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
      <el-form-item label="用户ID" prop="userId">
        <el-input
          v-model="queryParams.userId"
          placeholder="请输入用户ID"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="代理申请用户ID" prop="agentUserId">
        <el-input
          v-model="queryParams.agentUserId"
          placeholder="请输入代理申请用户ID"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="招生信息ID" prop="registerNeedId">
        <el-input
          v-model="queryParams.registerNeedId"
          placeholder="请输入招生信息ID"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="原单位/医院名称" prop="unitHospitalName">
        <el-input
          v-model="queryParams.unitHospitalName"
          placeholder="请输入原单位/医院名称"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="申请人姓名" prop="applicantName">
        <el-input
          v-model="queryParams.applicantName"
          placeholder="请输入申请人姓名"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="招生批次" prop="batchName">
        <el-input
          v-model="queryParams.batchName"
          placeholder="请输入招生批次"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="招生时间" prop="batchDate">
        <el-input
          v-model="queryParams.batchDate"
          placeholder="请输入招生截止时间"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="进修形式" prop="educationType">
        <el-input
          v-model="queryParams.educationType"
          placeholder="请输入进修形式"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="进修期限" prop="durationName">
        <el-input
          v-model="queryParams.durationName"
          placeholder="请输入进修期限"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="进修费用" prop="durationMoney">
        <el-input
          v-model="queryParams.durationMoney"
          placeholder="请输入进修费用"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="进修开始时间" prop="durationStartDate">
        <el-input
          v-model="queryParams.durationStartDate"
          placeholder="请输入进修开始时间"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="进修结束时间" prop="durationEndDate">
        <el-input
          v-model="queryParams.durationEndDate"
          placeholder="请输入进修结束时间"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="进修要求与目的" prop="educationAskObjective">
        <el-input
          v-model="queryParams.educationAskObjective"
          placeholder="请输入进修要求与目的"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="姓名" prop="userName">
        <el-input
          v-model="queryParams.userName"
          placeholder="请输入姓名"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="性别 1-男 2-女" prop="gender">
        <el-input
          v-model="queryParams.gender"
          placeholder="请输入性别 1-男 2-女"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="民族" prop="nation">
        <el-input
          v-model="queryParams.nation"
          placeholder="请输入民族"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="从事专业" prop="profession">
        <el-input
          v-model="queryParams.profession"
          placeholder="请输入从事专业"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="政治面貌" prop="politicalOutlook">
        <el-input
          v-model="queryParams.politicalOutlook"
          placeholder="请输入政治面貌"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="健康状况" prop="healthCondition">
        <el-input
          v-model="queryParams.healthCondition"
          placeholder="请输入健康状况"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="职称" prop="technicalTitle">
        <el-input
          v-model="queryParams.technicalTitle"
          placeholder="请输入职称"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="职务" prop="duties">
        <el-input
          v-model="queryParams.duties"
          placeholder="请输入职务"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="证件类型" prop="idCardType">
        <el-input
          v-model="queryParams.idCardType"
          placeholder="请输入证件类型"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="身份证号" prop="idCard">
        <el-input
          v-model="queryParams.idCard"
          placeholder="请输入身份证号"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="出生日期" prop="birthday">
        <el-input
          v-model="queryParams.birthday"
          placeholder="请输入出生日期"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="年龄" prop="age">
        <el-input
          v-model="queryParams.age"
          placeholder="请输入年龄"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="最高学历" prop="highestDegree">
        <el-input
          v-model="queryParams.highestDegree"
          placeholder="请输入最高学历"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="毕业院校" prop="graduateSchool">
        <el-input
          v-model="queryParams.graduateSchool"
          placeholder="请输入毕业院校"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="何时参加工作" prop="startWorking">
        <el-input
          v-model="queryParams.startWorking"
          placeholder="请输入何时参加工作"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="何时获得职业资格证书" prop="doctorCertificateDate">
        <el-input
          v-model="queryParams.doctorCertificateDate"
          placeholder="请输入何时获得职业资格证书"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="资格证书编号" prop="doctorCertificateNumber">
        <el-input
          v-model="queryParams.doctorCertificateNumber"
          placeholder="请输入资格证书编号"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="执业证书编号" prop="practicingCertificateNumber">
        <el-input
          v-model="queryParams.practicingCertificateNumber"
          placeholder="请输入执业证书编号"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="操作设备的名称" prop="operatingDevice">
        <el-input
          v-model="queryParams.operatingDevice"
          placeholder="请输入操作设备的名称"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="是否从事放射诊疗技术岗位" prop="engagedRadiatePost">
        <el-input
          v-model="queryParams.engagedRadiatePost"
          placeholder="请输入是否从事放射诊疗技术岗位"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="手机号码" prop="phoneNumber">
        <el-input
          v-model="queryParams.phoneNumber"
          placeholder="请输入手机号码"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="邮箱" prop="email">
        <el-input
          v-model="queryParams.email"
          placeholder="请输入邮箱"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="单位电话" prop="workTelephone">
        <el-input
          v-model="queryParams.workTelephone"
          placeholder="请输入单位电话"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="邮编" prop="zipCode">
        <el-input
          v-model="queryParams.zipCode"
          placeholder="请输入邮编"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="单位等级" prop="unitLevel">
        <el-input
          v-model="queryParams.unitLevel"
          placeholder="请输入单位等级"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="医院级别" prop="hospitalLevel">
        <el-input
          v-model="queryParams.hospitalLevel"
          placeholder="请输入医院级别"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="单位名称" prop="unitName">
        <el-input
          v-model="queryParams.unitName"
          placeholder="请输入单位名称"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="单位地址(省)" prop="unitProvince">
        <el-input
          v-model="queryParams.unitProvince"
          placeholder="请输入单位地址(省)"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="单位地址(市)" prop="unitCity">
        <el-input
          v-model="queryParams.unitCity"
          placeholder="请输入单位地址(市)"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="单位地址(区)" prop="unitDistrict">
        <el-input
          v-model="queryParams.unitDistrict"
          placeholder="请输入单位地址(区)"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="单位地址(地址)" prop="unitAddress">
        <el-input
          v-model="queryParams.unitAddress"
          placeholder="请输入单位地址(地址)"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="政治表现" prop="politicalRepresentation">
        <el-input
          v-model="queryParams.politicalRepresentation"
          placeholder="请输入政治表现"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="拟进修专业方面的工作基础" prop="proposedMajor">
        <el-input
          v-model="queryParams.proposedMajor"
          placeholder="请输入拟进修专业方面的工作基础"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="进修申请表" prop="registerApplicationForm">
        <el-input
          v-model="queryParams.registerApplicationForm"
          placeholder="请输入进修申请表"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="毕业证书" prop="diploma">
        <el-input
          v-model="queryParams.diploma"
          placeholder="请输入毕业证书"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="医疗机构等级图片" prop="medicalInstitutionLevel">
        <el-input
          v-model="queryParams.medicalInstitutionLevel"
          placeholder="请输入医疗机构等级图片"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="资格证书" prop="qualification">
        <el-input
          v-model="queryParams.qualification"
          placeholder="请输入资格证书"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="执业证书" prop="practicingCertificate">
        <el-input
          v-model="queryParams.practicingCertificate"
          placeholder="请输入执业证书"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="执业注册信息查询结果" prop="practiceResult">
        <el-input
          v-model="queryParams.practiceResult"
          placeholder="请输入执业注册信息查询结果"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="职称证书" prop="professionalTitleCertificate">
        <el-input
          v-model="queryParams.professionalTitleCertificate"
          placeholder="请输入职称证书"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="身份证正面" prop="idCardFront">
        <el-input
          v-model="queryParams.idCardFront"
          placeholder="请输入身份证正面"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="身份证背面" prop="idCardBack">
        <el-input
          v-model="queryParams.idCardBack"
          placeholder="请输入身份证背面"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="电子证件照" prop="electronicIdPhoto">
        <el-input
          v-model="queryParams.electronicIdPhoto"
          placeholder="请输入电子证件照"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="其他补充附件" prop="otherAttachment">
        <el-input
          v-model="queryParams.otherAttachment"
          placeholder="请输入其他补充附件"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="审核状态" prop="auditStatus">
        <el-input
          v-model="queryParams.auditStatus"
          placeholder="请输入审核状态"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item>
        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
      </el-form-item>
    </el-form>

    <el-row :gutter="10" class="mb8">
      <el-col :span="1.5">
        <el-button
          type="primary"
          plain
          icon="el-icon-plus"
          size="mini"
          @click="handleAdd"
          v-hasPermi="['business:registerInfo:add']"
        >新增</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="success"
          plain
          icon="el-icon-edit"
          size="mini"
          :disabled="single"
          @click="handleUpdate"
          v-hasPermi="['business:registerInfo:edit']"
        >修改</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="danger"
          plain
          icon="el-icon-delete"
          size="mini"
          :disabled="multiple"
          @click="handleDelete"
          v-hasPermi="['business:registerInfo:remove']"
        >删除</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="warning"
          plain
          icon="el-icon-download"
          size="mini"
          @click="handleExport"
          v-hasPermi="['business:registerInfo:export']"
        >导出</el-button>
      </el-col>
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
    </el-row>

    <el-table v-loading="loading" :data="registerInfoList" @selection-change="handleSelectionChange">
      <el-table-column type="selection" width="55" align="center" />
      <el-table-column label="主键" align="center" prop="id" />
      <el-table-column label="用户ID" align="center" prop="userId" />
      <el-table-column label="代理申请用户ID" align="center" prop="agentUserId" />
      <el-table-column label="招生信息ID" align="center" prop="registerNeedId" />
      <el-table-column label="原单位/医院名称" align="center" prop="unitHospitalName" />
      <el-table-column label="申请人姓名" align="center" prop="applicantName" />
      <el-table-column label="招生批次" align="center" prop="batchName" />
      <el-table-column label="招生时间" align="center" prop="batchDate" />
      <el-table-column label="进修形式" align="center" prop="educationType" />
      <el-table-column label="进修期限" align="center" prop="durationName" />
      <el-table-column label="进修费用" align="center" prop="durationMoney" />
      <el-table-column label="进修开始时间" align="center" prop="durationStartDate" />
      <el-table-column label="进修结束时间" align="center" prop="durationEndDate" />
      <el-table-column label="进修要求与目的" align="center" prop="educationAskObjective" />
      <el-table-column label="姓名" align="center" prop="userName" />
      <el-table-column label="性别 1-男 2-女" align="center" prop="gender" />
      <el-table-column label="民族" align="center" prop="nation" />
      <el-table-column label="从事专业" align="center" prop="profession" />
      <el-table-column label="政治面貌" align="center" prop="politicalOutlook" />
      <el-table-column label="健康状况" align="center" prop="healthCondition" />
      <el-table-column label="职称" align="center" prop="technicalTitle" />
      <el-table-column label="职务" align="center" prop="duties" />
      <el-table-column label="证件类型" align="center" prop="idCardType" />
      <el-table-column label="身份证号" align="center" prop="idCard" />
      <el-table-column label="出生日期" align="center" prop="birthday" />
      <el-table-column label="年龄" align="center" prop="age" />
      <el-table-column label="最高学历" align="center" prop="highestDegree" />
      <el-table-column label="毕业院校" align="center" prop="graduateSchool" />
      <el-table-column label="何时参加工作" align="center" prop="startWorking" />
      <el-table-column label="何时获得职业资格证书" align="center" prop="doctorCertificateDate" />
      <el-table-column label="资格证书编号" align="center" prop="doctorCertificateNumber" />
      <el-table-column label="执业证书编号" align="center" prop="practicingCertificateNumber" />
      <el-table-column label="操作设备的名称" align="center" prop="operatingDevice" />
      <el-table-column label="是否从事放射诊疗技术岗位" align="center" prop="engagedRadiatePost" />
      <el-table-column label="手机号码" align="center" prop="phoneNumber" />
      <el-table-column label="邮箱" align="center" prop="email" />
      <el-table-column label="单位电话" align="center" prop="workTelephone" />
      <el-table-column label="邮编" align="center" prop="zipCode" />
      <el-table-column label="单位等级" align="center" prop="unitLevel" />
      <el-table-column label="医院级别" align="center" prop="hospitalLevel" />
      <el-table-column label="单位名称" align="center" prop="unitName" />
      <el-table-column label="单位地址(省)" align="center" prop="unitProvince" />
      <el-table-column label="单位地址(市)" align="center" prop="unitCity" />
      <el-table-column label="单位地址(区)" align="center" prop="unitDistrict" />
      <el-table-column label="单位地址(地址)" align="center" prop="unitAddress" />
      <el-table-column label="政治表现" align="center" prop="politicalRepresentation" />
      <el-table-column label="拟进修专业方面的工作基础" align="center" prop="proposedMajor" />
      <el-table-column label="进修申请表" align="center" prop="registerApplicationForm" />
      <el-table-column label="毕业证书" align="center" prop="diploma" />
      <el-table-column label="医疗机构等级图片" align="center" prop="medicalInstitutionLevel" />
      <el-table-column label="资格证书" align="center" prop="qualification" />
      <el-table-column label="执业证书" align="center" prop="practicingCertificate" />
      <el-table-column label="执业注册信息查询结果" align="center" prop="practiceResult" />
      <el-table-column label="职称证书" align="center" prop="professionalTitleCertificate" />
      <el-table-column label="身份证正面" align="center" prop="idCardFront" />
      <el-table-column label="身份证背面" align="center" prop="idCardBack" />
      <el-table-column label="电子证件照" align="center" prop="electronicIdPhoto" />
      <el-table-column label="其他补充附件" align="center" prop="otherAttachment" />
      <el-table-column label="审核状态" align="center" prop="auditStatus" />
      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
        <template slot-scope="scope">
          <el-button
            size="mini"
            type="text"
            icon="el-icon-edit"
            @click="handleUpdate(scope.row)"
            v-hasPermi="['business:registerInfo:edit']"
          >修改</el-button>
          <el-button
            size="mini"
            type="text"
            icon="el-icon-delete"
            @click="handleDelete(scope.row)"
            v-hasPermi="['business:registerInfo:remove']"
          >删除</el-button>
        </template>
      </el-table-column>
    </el-table>

    <pagination
      v-show="total>0"
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
      @pagination="getList"
    />

    <!-- 添加或修改报名信息对话框 -->
    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
        <el-form-item label="用户ID" prop="userId">
          <el-input v-model="form.userId" placeholder="请输入用户ID" />
        </el-form-item>
        <el-form-item label="代理申请用户ID" prop="agentUserId">
          <el-input v-model="form.agentUserId" placeholder="请输入代理申请用户ID" />
        </el-form-item>
        <el-form-item label="招生信息ID" prop="registerNeedId">
          <el-input v-model="form.registerNeedId" placeholder="请输入招生信息ID" />
        </el-form-item>
        <el-form-item label="原单位/医院名称" prop="unitHospitalName">
          <el-input v-model="form.unitHospitalName" placeholder="请输入原单位/医院名称" />
        </el-form-item>
        <el-form-item label="申请人姓名" prop="applicantName">
          <el-input v-model="form.applicantName" placeholder="请输入申请人姓名" />
        </el-form-item>
        <el-form-item label="招生批次" prop="batchName">
          <el-input v-model="form.batchName" placeholder="请输入招生批次" />
        </el-form-item>
        <el-form-item label="招生时间" prop="batchDate">
          <el-input v-model="form.batchDate" placeholder="请输入招生截止时间" />
        </el-form-item>
        <el-form-item label="进修形式" prop="educationType">
          <el-input v-model="form.educationType" placeholder="请输入进修形式" />
        </el-form-item>
        <el-form-item label="进修期限" prop="durationName">
          <el-input v-model="form.durationName" placeholder="请输入进修期限" />
        </el-form-item>
        <el-form-item label="进修费用" prop="durationMoney">
          <el-input v-model="form.durationMoney" placeholder="请输入进修费用" />
        </el-form-item>
        <el-form-item label="进修开始时间" prop="durationStartDate">
          <el-input v-model="form.durationStartDate" placeholder="请输入进修开始时间" />
        </el-form-item>
        <el-form-item label="进修结束时间" prop="durationEndDate">
          <el-input v-model="form.durationEndDate" placeholder="请输入进修结束时间" />
        </el-form-item>
        <el-form-item label="进修要求与目的" prop="educationAskObjective">
          <el-input v-model="form.educationAskObjective" placeholder="请输入进修要求与目的" />
        </el-form-item>
        <el-form-item label="姓名" prop="userName">
          <el-input v-model="form.userName" placeholder="请输入姓名" />
        </el-form-item>
        <el-form-item label="性别 1-男 2-女" prop="gender">
          <el-input v-model="form.gender" placeholder="请输入性别 1-男 2-女" />
        </el-form-item>
        <el-form-item label="民族" prop="nation">
          <el-input v-model="form.nation" placeholder="请输入民族" />
        </el-form-item>
        <el-form-item label="从事专业" prop="profession">
          <el-input v-model="form.profession" placeholder="请输入从事专业" />
        </el-form-item>
        <el-form-item label="政治面貌" prop="politicalOutlook">
          <el-input v-model="form.politicalOutlook" placeholder="请输入政治面貌" />
        </el-form-item>
        <el-form-item label="健康状况" prop="healthCondition">
          <el-input v-model="form.healthCondition" placeholder="请输入健康状况" />
        </el-form-item>
        <el-form-item label="职称" prop="technicalTitle">
          <el-input v-model="form.technicalTitle" placeholder="请输入职称" />
        </el-form-item>
        <el-form-item label="职务" prop="duties">
          <el-input v-model="form.duties" placeholder="请输入职务" />
        </el-form-item>
        <el-form-item label="证件类型" prop="idCardType">
          <el-input v-model="form.idCardType" placeholder="请输入证件类型" />
        </el-form-item>
        <el-form-item label="身份证号" prop="idCard">
          <el-input v-model="form.idCard" placeholder="请输入身份证号" />
        </el-form-item>
        <el-form-item label="出生日期" prop="birthday">
          <el-input v-model="form.birthday" placeholder="请输入出生日期" />
        </el-form-item>
        <el-form-item label="年龄" prop="age">
          <el-input v-model="form.age" placeholder="请输入年龄" />
        </el-form-item>
        <el-form-item label="最高学历" prop="highestDegree">
          <el-input v-model="form.highestDegree" placeholder="请输入最高学历" />
        </el-form-item>
        <el-form-item label="毕业院校" prop="graduateSchool">
          <el-input v-model="form.graduateSchool" placeholder="请输入毕业院校" />
        </el-form-item>
        <el-form-item label="何时参加工作" prop="startWorking">
          <el-input v-model="form.startWorking" placeholder="请输入何时参加工作" />
        </el-form-item>
        <el-form-item label="何时获得职业资格证书" prop="doctorCertificateDate">
          <el-input v-model="form.doctorCertificateDate" placeholder="请输入何时获得职业资格证书" />
        </el-form-item>
        <el-form-item label="资格证书编号" prop="doctorCertificateNumber">
          <el-input v-model="form.doctorCertificateNumber" placeholder="请输入资格证书编号" />
        </el-form-item>
        <el-form-item label="执业证书编号" prop="practicingCertificateNumber">
          <el-input v-model="form.practicingCertificateNumber" placeholder="请输入执业证书编号" />
        </el-form-item>
        <el-form-item label="操作设备的名称" prop="operatingDevice">
          <el-input v-model="form.operatingDevice" placeholder="请输入操作设备的名称" />
        </el-form-item>
        <el-form-item label="是否从事放射诊疗技术岗位" prop="engagedRadiatePost">
          <el-input v-model="form.engagedRadiatePost" placeholder="请输入是否从事放射诊疗技术岗位" />
        </el-form-item>
        <el-form-item label="手机号码" prop="phoneNumber">
          <el-input v-model="form.phoneNumber" placeholder="请输入手机号码" />
        </el-form-item>
        <el-form-item label="邮箱" prop="email">
          <el-input v-model="form.email" placeholder="请输入邮箱" />
        </el-form-item>
        <el-form-item label="单位电话" prop="workTelephone">
          <el-input v-model="form.workTelephone" placeholder="请输入单位电话" />
        </el-form-item>
        <el-form-item label="邮编" prop="zipCode">
          <el-input v-model="form.zipCode" placeholder="请输入邮编" />
        </el-form-item>
        <el-form-item label="单位等级" prop="unitLevel">
          <el-input v-model="form.unitLevel" placeholder="请输入单位等级" />
        </el-form-item>
        <el-form-item label="医院级别" prop="hospitalLevel">
          <el-input v-model="form.hospitalLevel" placeholder="请输入医院级别" />
        </el-form-item>
        <el-form-item label="单位名称" prop="unitName">
          <el-input v-model="form.unitName" placeholder="请输入单位名称" />
        </el-form-item>
        <el-form-item label="单位地址(省)" prop="unitProvince">
          <el-input v-model="form.unitProvince" placeholder="请输入单位地址(省)" />
        </el-form-item>
        <el-form-item label="单位地址(市)" prop="unitCity">
          <el-input v-model="form.unitCity" placeholder="请输入单位地址(市)" />
        </el-form-item>
        <el-form-item label="单位地址(区)" prop="unitDistrict">
          <el-input v-model="form.unitDistrict" placeholder="请输入单位地址(区)" />
        </el-form-item>
        <el-form-item label="单位地址(地址)" prop="unitAddress">
          <el-input v-model="form.unitAddress" placeholder="请输入单位地址(地址)" />
        </el-form-item>
        <el-form-item label="政治表现" prop="politicalRepresentation">
          <el-input v-model="form.politicalRepresentation" placeholder="请输入政治表现" />
        </el-form-item>
        <el-form-item label="拟进修专业方面的工作基础" prop="proposedMajor">
          <el-input v-model="form.proposedMajor" placeholder="请输入拟进修专业方面的工作基础" />
        </el-form-item>
        <el-form-item label="进修申请表" prop="registerApplicationForm">
          <el-input v-model="form.registerApplicationForm" placeholder="请输入进修申请表" />
        </el-form-item>
        <el-form-item label="毕业证书" prop="diploma">
          <el-input v-model="form.diploma" placeholder="请输入毕业证书" />
        </el-form-item>
        <el-form-item label="医疗机构等级图片" prop="medicalInstitutionLevel">
          <el-input v-model="form.medicalInstitutionLevel" placeholder="请输入医疗机构等级图片" />
        </el-form-item>
        <el-form-item label="资格证书" prop="qualification">
          <el-input v-model="form.qualification" placeholder="请输入资格证书" />
        </el-form-item>
        <el-form-item label="执业证书" prop="practicingCertificate">
          <el-input v-model="form.practicingCertificate" placeholder="请输入执业证书" />
        </el-form-item>
        <el-form-item label="执业注册信息查询结果" prop="practiceResult">
          <el-input v-model="form.practiceResult" placeholder="请输入执业注册信息查询结果" />
        </el-form-item>
        <el-form-item label="职称证书" prop="professionalTitleCertificate">
          <el-input v-model="form.professionalTitleCertificate" placeholder="请输入职称证书" />
        </el-form-item>
        <el-form-item label="身份证正面" prop="idCardFront">
          <el-input v-model="form.idCardFront" placeholder="请输入身份证正面" />
        </el-form-item>
        <el-form-item label="身份证背面" prop="idCardBack">
          <el-input v-model="form.idCardBack" placeholder="请输入身份证背面" />
        </el-form-item>
        <el-form-item label="电子证件照" prop="electronicIdPhoto">
          <el-input v-model="form.electronicIdPhoto" placeholder="请输入电子证件照" />
        </el-form-item>
        <el-form-item label="其他补充附件" prop="otherAttachment">
          <el-input v-model="form.otherAttachment" placeholder="请输入其他补充附件" />
        </el-form-item>
        <el-form-item label="审核状态" prop="auditStatus">
          <el-input v-model="form.auditStatus" placeholder="请输入审核状态" />
        </el-form-item>
        <el-form-item label="是否删除 1-是 2-否" prop="deleteStatus">
          <el-input v-model="form.deleteStatus" placeholder="请输入是否删除 1-是 2-否" />
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm">确 定</el-button>
        <el-button @click="cancel">取 消</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
import { listRegisterInfo, getRegisterInfo, delRegisterInfo, addRegisterInfo, updateRegisterInfo } from "@/api/business/registerInfo";

export default {
  name: "RegisterInfo",
  data() {
    return {
      // 根路径
      baseURL: process.env.VUE_APP_BASE_API,
      // 遮罩层
      loading: true,
      // 选中数组
      ids: [],
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
      // 报名信息表格数据
      registerInfoList: [],
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        userId: null,
        agentUserId: null,
        registerNeedId: null,
        unitHospitalName: null,
        applicantName: null,
        batchName: null,
        batchDate: null,
        educationType: null,
        durationName: null,
        durationMoney: null,
        durationStartDate: null,
        durationEndDate: null,
        educationAskObjective: null,
        userName: null,
        gender: null,
        nation: null,
        profession: null,
        politicalOutlook: null,
        healthCondition: null,
        technicalTitle: null,
        duties: null,
        idCardType: null,
        idCard: null,
        birthday: null,
        age: null,
        highestDegree: null,
        graduateSchool: null,
        startWorking: null,
        doctorCertificateDate: null,
        doctorCertificateNumber: null,
        practicingCertificateNumber: null,
        operatingDevice: null,
        engagedRadiatePost: null,
        phoneNumber: null,
        email: null,
        workTelephone: null,
        zipCode: null,
        unitLevel: null,
        hospitalLevel: null,
        unitName: null,
        unitProvince: null,
        unitCity: null,
        unitDistrict: null,
        unitAddress: null,
        politicalRepresentation: null,
        proposedMajor: null,
        registerApplicationForm: null,
        diploma: null,
        medicalInstitutionLevel: null,
        qualification: null,
        practicingCertificate: null,
        practiceResult: null,
        professionalTitleCertificate: null,
        idCardFront: null,
        idCardBack: null,
        electronicIdPhoto: null,
        otherAttachment: null,
        auditStatus: null,
      },
      // 表单参数
      form: {},
      // 表单校验
      rules: {
        id: [
          { required: true, message: "主键不能为空", trigger: "blur" }
        ],
        userId: [
          { required: true, message: "用户ID不能为空", trigger: "blur" }
        ],
        agentUserId: [
          { required: true, message: "代理申请用户ID不能为空", trigger: "blur" }
        ],
        registerNeedId: [
          { required: true, message: "招生信息ID不能为空", trigger: "blur" }
        ],
        unitHospitalName: [
          { required: true, message: "原单位/医院名称不能为空", trigger: "blur" }
        ],
        applicantName: [
          { required: true, message: "申请人姓名不能为空", trigger: "blur" }
        ],
        batchName: [
          { required: true, message: "招生批次不能为空", trigger: "blur" }
        ],
        batchDate: [
          { required: true, message: "招生截止时间不能为空", trigger: "blur" }
        ],
        educationType: [
          { required: true, message: "进修形式不能为空", trigger: "blur" }
        ],
        durationName: [
          { required: true, message: "进修期限不能为空", trigger: "blur" }
        ],
        durationMoney: [
          { required: true, message: "进修费用不能为空", trigger: "blur" }
        ],
        durationStartDate: [
          { required: true, message: "进修开始时间不能为空", trigger: "blur" }
        ],
        durationEndDate: [
          { required: true, message: "进修结束时间不能为空", trigger: "blur" }
        ],
        educationAskObjective: [
          { required: true, message: "进修要求与目的不能为空", trigger: "blur" }
        ],
        userName: [
          { required: true, message: "姓名不能为空", trigger: "blur" }
        ],
        gender: [
          { required: true, message: "性别 1-男 2-女不能为空", trigger: "blur" }
        ],
        nation: [
          { required: true, message: "民族不能为空", trigger: "blur" }
        ],
        profession: [
          { required: true, message: "从事专业不能为空", trigger: "blur" }
        ],
        politicalOutlook: [
          { required: true, message: "政治面貌不能为空", trigger: "blur" }
        ],
        healthCondition: [
          { required: true, message: "健康状况不能为空", trigger: "blur" }
        ],
        technicalTitle: [
          { required: true, message: "职称不能为空", trigger: "blur" }
        ],
        duties: [
          { required: true, message: "职务不能为空", trigger: "blur" }
        ],
        idCardType: [
          { required: true, message: "证件类型不能为空", trigger: "blur" }
        ],
        idCard: [
          { required: true, message: "身份证号不能为空", trigger: "blur" }
        ],
        birthday: [
          { required: true, message: "出生日期不能为空", trigger: "blur" }
        ],
        age: [
          { required: true, message: "年龄不能为空", trigger: "blur" }
        ],
        highestDegree: [
          { required: true, message: "最高学历不能为空", trigger: "blur" }
        ],
        graduateSchool: [
          { required: true, message: "毕业院校不能为空", trigger: "blur" }
        ],
        startWorking: [
          { required: true, message: "何时参加工作不能为空", trigger: "blur" }
        ],
        doctorCertificateDate: [
          { required: true, message: "何时获得职业资格证书不能为空", trigger: "blur" }
        ],
        doctorCertificateNumber: [
          { required: true, message: "资格证书编号不能为空", trigger: "blur" }
        ],
        practicingCertificateNumber: [
          { required: true, message: "执业证书编号不能为空", trigger: "blur" }
        ],
        operatingDevice: [
          { required: true, message: "操作设备的名称不能为空", trigger: "blur" }
        ],
        engagedRadiatePost: [
          { required: true, message: "是否从事放射诊疗技术岗位不能为空", trigger: "blur" }
        ],
        phoneNumber: [
          { required: true, message: "手机号码不能为空", trigger: "blur" }
        ],
        email: [
          { required: true, message: "邮箱不能为空", trigger: "blur" }
        ],
        workTelephone: [
          { required: true, message: "单位电话不能为空", trigger: "blur" }
        ],
        zipCode: [
          { required: true, message: "邮编不能为空", trigger: "blur" }
        ],
        unitLevel: [
          { required: true, message: "单位等级不能为空", trigger: "blur" }
        ],
        hospitalLevel: [
          { required: true, message: "医院级别不能为空", trigger: "blur" }
        ],
        unitName: [
          { required: true, message: "单位名称不能为空", trigger: "blur" }
        ],
        unitProvince: [
          { required: true, message: "单位地址(省)不能为空", trigger: "blur" }
        ],
        unitCity: [
          { required: true, message: "单位地址(市)不能为空", trigger: "blur" }
        ],
        unitDistrict: [
          { required: true, message: "单位地址(区)不能为空", trigger: "blur" }
        ],
        unitAddress: [
          { required: true, message: "单位地址(地址)不能为空", trigger: "blur" }
        ],
        politicalRepresentation: [
          { required: true, message: "政治表现不能为空", trigger: "blur" }
        ],
        proposedMajor: [
          { required: true, message: "拟进修专业方面的工作基础不能为空", trigger: "blur" }
        ],
        registerApplicationForm: [
          { required: true, message: "进修申请表不能为空", trigger: "blur" }
        ],
        diploma: [
          { required: true, message: "毕业证书不能为空", trigger: "blur" }
        ],
        medicalInstitutionLevel: [
          { required: true, message: "医疗机构等级图片不能为空", trigger: "blur" }
        ],
        qualification: [
          { required: true, message: "资格证书不能为空", trigger: "blur" }
        ],
        practicingCertificate: [
          { required: true, message: "执业证书不能为空", trigger: "blur" }
        ],
        practiceResult: [
          { required: true, message: "执业注册信息查询结果不能为空", trigger: "blur" }
        ],
        professionalTitleCertificate: [
          { required: true, message: "职称证书不能为空", trigger: "blur" }
        ],
        idCardFront: [
          { required: true, message: "身份证正面不能为空", trigger: "blur" }
        ],
        idCardBack: [
          { required: true, message: "身份证背面不能为空", trigger: "blur" }
        ],
        electronicIdPhoto: [
          { required: true, message: "电子证件照不能为空", trigger: "blur" }
        ],
        otherAttachment: [
          { required: true, message: "其他补充附件不能为空", trigger: "blur" }
        ],
        auditStatus: [
          { required: true, message: "审核状态不能为空", trigger: "blur" }
        ],
      }
    };
  },
  created() {
    this.getList();
  },
  methods: {
    /** 查询报名信息列表 */
    getList() {
      this.loading = true;
      listRegisterInfo(this.queryParams).then(response => {
        this.registerInfoList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
    // 取消按钮
    cancel() {
      this.open = false;
      this.reset();
    },
    // 表单重置
    reset() {
      this.form = {
        id: null,
        userId: null,
        agentUserId: null,
        registerNeedId: null,
        unitHospitalName: null,
        applicantName: null,
        batchName: null,
        batchDate: null,
        educationType: null,
        durationName: null,
        durationMoney: null,
        durationStartDate: null,
        durationEndDate: null,
        educationAskObjective: null,
        userName: null,
        gender: null,
        nation: null,
        profession: null,
        politicalOutlook: null,
        healthCondition: null,
        technicalTitle: null,
        duties: null,
        idCardType: null,
        idCard: null,
        birthday: null,
        age: null,
        highestDegree: null,
        graduateSchool: null,
        startWorking: null,
        doctorCertificateDate: null,
        doctorCertificateNumber: null,
        practicingCertificateNumber: null,
        operatingDevice: null,
        engagedRadiatePost: null,
        phoneNumber: null,
        email: null,
        workTelephone: null,
        zipCode: null,
        unitLevel: null,
        hospitalLevel: null,
        unitName: null,
        unitProvince: null,
        unitCity: null,
        unitDistrict: null,
        unitAddress: null,
        politicalRepresentation: null,
        proposedMajor: null,
        registerApplicationForm: null,
        diploma: null,
        medicalInstitutionLevel: null,
        qualification: null,
        practicingCertificate: null,
        practiceResult: null,
        professionalTitleCertificate: null,
        idCardFront: null,
        idCardBack: null,
        electronicIdPhoto: null,
        otherAttachment: null,
        auditStatus: null,
      };
      this.resetForm("form");
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.resetForm("queryForm");
      this.handleQuery();
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
      this.ids = selection.map(item => item.id)
      this.single = selection.length!==1
      this.multiple = !selection.length
    },
    /** 新增按钮操作 */
    handleAdd() {
      this.reset();
      this.open = true;
      this.title = "添加报名信息";
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
      this.reset();
      const id = row.id || this.ids
      getRegisterInfo(id).then(response => {
        this.form = response.data;
        this.open = true;
        this.title = "修改报名信息";
      });
    },
    /** 提交按钮 */
    submitForm() {
      this.$refs["form"].validate(valid => {
        if (valid) {
          if (this.form.id != null) {
            updateRegisterInfo(this.form).then(response => {
              this.$modal.msgSuccess("修改成功");
              this.open = false;
              this.getList();
            });
          } else {
            addRegisterInfo(this.form).then(response => {
              this.$modal.msgSuccess("新增成功");
              this.open = false;
              this.getList();
            });
          }
        }
      });
    },
    /** 删除按钮操作 */
    handleDelete(row) {
      const ids = row.id || this.ids;
      this.$modal.confirm('是否确认删除报名信息编号为"' + ids + '"的数据项？').then(function() {
        return delRegisterInfo(ids);
      }).then(() => {
        this.getList();
        this.$modal.msgSuccess("删除成功");
      }).catch(() => {});
    },
    /** 导出按钮操作 */
    handleExport() {
      this.download('business/registerInfo/export', {
        ...this.queryParams
      }, `registerInfo_${new Date().getTime()}.xlsx`)
    }
  }
};
</script>
